package com.cyz.web.app.combination;

public class Client {

    public static void main(String[] args) {

        Composite root = new Composite("综合实验室");
            root.add(new Leaf("综合设备1"));
            root.add(new Leaf("综合设备2"));


        Composite branchLevel121 = new Composite("化学实验室");
        branchLevel121.add(new Leaf("试管"));
        branchLevel121.add(new Leaf("烧杯"));
        branchLevel121.add(new Leaf("锥形瓶"));


        Leaf leaf = new Leaf("针管");
        leaf.add(new Leaf("fff"));


        root.add(branchLevel121);



        root.display(2);

    }
}
